package Adapter.ObjectStructure;

import Adapter.ClassStructure.INewJuicer;
import Adapter.ClassStructure.OldJuicer;
import Singleton.MyFruit;

public class Adapter implements INewJuicer {
    private OldJuicer oldJuicer;

    public Adapter()
    {
        oldJuicer = new OldJuicer();
    }

    @Override
    public String newPort(MyFruit fruit1, MyFruit fruit2) {
        String str = "混合果汁" + oldJuicer.onePort(fruit1) + "&" + oldJuicer.onePort(fruit2);
        return str;
    }
}
